<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@page isELIgnored="false"%><!--解除被禁用的el表达式 --> 
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<jsp:include page="inc.jsp" />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	
		
	
	</head>
	<body>
		<script type="text/javascript">
			
			$(function(){
				$('#pp').portal({
					border:true,
					fit:true
					
				});
				addPanel();
				
				$('#tableNotice').datagrid({
					fit:true,
					url:'${ctx}/nc/findNotice.coc',
					columns:[[
					         {field:'ck',checkbox:true},
					         {field:'title',title:'标题',width:100},
					         {field:'showDate',title:'发布时间',width:120},
					         {field:'avtive',title:'操作',align:'center',
					        	formatter:function(v,r,i){
					        		return '<a href="#" onclick="checkNotice('+i+')">查看</a>';
					        	}	 
					         }
					         ]]
				});
			});
			function checkNotice(index){
				$('#tableNotice').datagrid('selectRow',index);
				var row=$("#tableNotice").datagrid('getSelected');
				$.parent.modalDialog({
					title:"查看通知",
					href:'${ctx}/nc/lookNotice/'+row.id+'.coc',
					width:450,
					height:550
				});
			}
			
			function addPanel(){
			var p=	$('<div></div>').appendTo('body');
			p.panel({
				title:"测试窗口",
				heigth:500,
				//fit:true,
				//href:'${ctx}/pc/pie.coc',
				closable:true,
				content:'<iframe src="${ctx}/pc/pie.coc" scrolling="no" frameborder="0" style="width: 100%;height: 99%;"></iframe>'
			});
			$('#pp').portal('add',{
				panel:p,
				columnIndex:0
			});
			$('#pp').portal("resize");
			}
		</script>
		<div id="pp" style="position: relative;height: 500px;">
			 <div style="width: 65%;;"></div>
			<div style="width: 35%;">
				 <div class="easyui-panel" title="通知列表" closable="false" style="height:200px">
				<table id="tableNotice"></table>
				</div> 
			</div> 
		</div>
	</body>
</html>
